package com.javase.A211008.mode;

public class Animal {

    public String animalName;
    public String shout;
    public String food;

    public Animal(String animalName,String shout) {
        this.animalName = animalName;
        this.shout = shout;
    }

    public void shout(){
        System.out.println(shout);
    }

    public void eat(String food){
        System.out.println(animalName+"正在吃"+food);
    }
    public void sleep(){
        System.out.println(animalName+"正在睡");
    }
    public void introduction() {
        System.out.println("大家好！我是"+ animalName + ".");
    }
}
